<template>
	<view style="padding: 0 20upx;" class="page">

		<view style="line-height: 80upx;height: 80upx;margin: 25px 0;">
			<text style="font-size: 38upx;font-weight: 550; ">{{res.article_title}} </text>
			<p style="padding-left: 20upx;">发布时间: {{res.article_date}}</p>
		</view>
		<!-- <view style="text-align: center;">
			<video class="edui-upload-video video-js vjs-default-skin video-js" controls preload="none" width="346"
				height="200" :src="content">
			</video>
		</view> -->
		<view class="">
			<view class="" v-html="res.article_content" style="text-align: center;">

			</view>
		</view>
		<p>
			<!--  <video poster="http://newjibei.jibeimall.com/web/resource/images/player.jpg" 
			class="edui-upload-video  vjs-default-skin video-js video-js" controls="" preload="none" width="300" height="200" 
			src="http://newjibei.jibeimall.com/attachment/videos/2/2023/11/tIQ5D9AHOq8n69dT56TO46I1149WW4.mp4">
		        
		    </video> -->
		</p>
	</view>

</template>

<script>
	import {
		article_article_detail
	} from '@/api/consult.js';
	export default {
		data() {
			return {
				res: {},
				openid: '',
				essaysid: '',
				content: '',
			};
		},
		onLoad: function(e) {
			this.essaysid = e.id
			uni.showLoading()
			uni.getStorage({
				key: 'openid',
				success: (res) => {
					this.openid = res.data;
					this.setData();
				},
				fail: () => {
					uni.reLaunch({
						url: '/pages/login/login'
					});
				}
			});
		},
		methods: {
			async setData() {
				let updata = {
					id: this.essaysid
				}
				let ress = await article_article_detail(updata);


				console.log(ress);
				this.res = ress
				// let content = ress.article_content
				// this.content = content.substring(content.indexOf('src="')
				// // this.content = content.slice(5)
				// console.log(this.content)



			},

		}
	}
</script>

<style>
	.page {
		width: 100vw;
		height: 100vh;
		overflow: auto;
		/* background: url('/static/zixun/bg.png')0 0 no-repeat; */
		background-size: 100% 100%;
		padding-top: var(--status-bar-height);
	}

	.edui-upload-video {
		width: 100vw;
		height: 30vh;
	}
</style>